import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {TemplateDrivenComponent} from './template-driven/template-driven.component';
import {ReactiveComponent} from './reactive/reactive.component';
import {TemplateDriven01Component} from './template-driven01/template-driven01.component';
import {Reactive01Component} from './reactive01/reactive01.component';
import {ByteLengthComponent} from './byte-length/byte-length.component';
import {GreatAsyncComponent} from './great-async/great-async.component';
import {RegexpComponent} from './regexp/regexp.component';
import {CanDeactivateGuard} from 'great-ngform';

const routes: Routes = [
  {path: 'template', component: TemplateDrivenComponent, canDeactivate: [CanDeactivateGuard]},
  {path: 'template01', component: TemplateDriven01Component},
  {path: 'reactive', component: ReactiveComponent},
  {path: 'reactive01', component: Reactive01Component},
  {path: 'byte-length', component: ByteLengthComponent},
  {path: 'great-async', component: GreatAsyncComponent},
  {path: 'regexp', component: RegexpComponent},
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
/**
 * ng generate module form/form-routing --flat --module=form
 * */
export class FormRoutingModule {
}
